package com.example.shardingdemo.entity;

import jakarta.annotation.Generated;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.GenericGenerator;

import java.io.Serial;
import java.io.Serializable;

/**
 * (TDict)实体类
 *
 * @author makejava
 * @since 2024-09-01 12:12:37
 */
@Entity
@Getter
@Setter
@ToString
@RequiredArgsConstructor
@Table(name = "t_dict")
public class TDict implements Serializable {
    @Serial
    private static final long serialVersionUID = 662378286314135571L;

    @Id
    // 指定id生成策略
    @GenericGenerator(name = "generatePk", strategy = "com.example.shardingdemo.util.CustomerIdGenerator")
    // generator的值为@GenericGenerator的name
    @GeneratedValue(generator = "generatePk")
    private Long id;

    private String dictType;


}

